<!DOCTYPE html>
<html>
	<head>
		<title>wShop</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
		<meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.">
		<link rel="stylesheet" href="css/weui.min.css">
		<link rel="stylesheet" href="css/jquery-weui.css">
		<link rel="stylesheet" href="css/demos.css">
		<link rel="stylesheet" href="css/base.css">
	</head>
	<body>
		<div id="app">
			<div class="loading" v-if="loadingHidden">
				<div class="loading_box">
					<div class="loading3 loading3_1"></div>
					<div class="loading3 loading3_2"></div>
					<div class="loading3 loading3_3"></div>
				</div>
			</div>
			<div class="swiper-container">
			  <div class="swiper-wrapper">
				<div class="swiper-slide" v-for="(vo,index) in bannerArr" v-cloak>
					<img :src="vo.images" @click="clickBanner(index)"/>
				</div>
			  </div>
			  <div class="swiper-pagination"></div>
			</div>
		</div>
	</body>
<script src="js/jquery-2.1.4.js"></script>
<script src="js/fastclick.js"></script>
<script src="js/jquery-weui.js"></script>
<script src="js/swiper.js"></script>
<script src="js/vue2.5.js"></script>
<script src="js/base.js"></script>
<script>
	//初始化vue
	var vm = new Vue({
		el:'#app',
		data:{
			id:'',
			bannerArr:[],
			loadingHidden:true,
		},
		methods:{
			init:function(){
				vm.id = sessionId();
				var params = {
					url: 'getGoodsContent',
					type: 'POST',
					data: { id: vm.id}
				};
				request(params,(res)=>{
					if(res.error_code == 8888){
						console.log(res);
						swiperPic();
						vm.loadingHidden = false;
					};
				});
			},
		}
				
	});
	vm.init();
</script>
</html>
